{include file="header.htm" /}
<body style="background-color: #FFF; overflow: auto;">
<div id="toolTipLayer" style="position: absolute; z-index: 9999; display: none; visibility: visible; left: 95px; top: 573px;"></div>
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
    {include file="bar.htm" /}
    <!-- 操作说明 -->
    <div class="explanation">
        <ul>
            <li>注意事项：待微信应用审核之后，才能进行有效使用！&nbsp;【<a href="JavaScript:void(0);" style="color: red;" data-href="https://www.eyoucms.com/plus/view.php?aid=8784" onclick="openFullframe(this,'微信扫码登录插件使用指南');">查看详细配置教程</a>】</li>
            <li>会员绑定\解绑：按照教程配置后可以在会员中心绑定\解绑微信！&nbsp;【<a href="JavaScript:void(0);" style="color: red;" data-href="https://www.eyoucms.com/plus/view.php?aid=28335" onclick="openFullframe(this,'微信绑定使用指南');">查看详细配置教程</a>】</li>
        </ul>
    </div>
    <form class="form-horizontal" id="post_form" action="{:weapp_url('WxLogin/WxLogin/save')}" method="post">
        <div class="ncap-form-default">
            {if condition="!empty($info.data.appid) && !empty($info.data.secret)"}
            <dl class="row">
                <dt class="tit">
                    <label>前台登录入口</label>
                </dt>
                <dd class="opt">
                    <div class="onoff">
                        <label for="login_show1" class="cb-enable {if condition='isset($info.data.login_show) && $info.data.login_show eq 1'}selected{/if}">显示</label>
                        <label for="login_show0" class="cb-disable {if condition='!isset($info.data.login_show) || $info.data.login_show eq 0'}selected{/if}">隐藏</label>
                        <input id="login_show1" name="login_show" value="1" type="radio" {if condition="isset($info.data.login_show) && $info.data.login_show eq 1"} checked="checked"{/if}>
                        <input id="login_show0" name="login_show" value="0" type="radio" {if condition="!isset($info.data.login_show) || $info.data.login_show eq 0"} checked="checked"{/if}>
                    </div>
                    <p class="notic">前台登录页面是否显示微信登录按钮</p>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="appid">登录入口标签</label>
                </dt>
                <dd class="opt">
                    <a href="javascript:void(0);" onclick="showtext('wxlogin_url');" class="ncap-btn ncap-btn-green wxlogin_url" data-clipboard-text="<a href='{$wxlogin_url}'>微信登录</a>">复制标签</a>
                    <span class="err"></span>
                    <p class="notic">&lt;a href='{$wxlogin_url}'&gt;微信登录&lt;/a&gt;</p>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label>绑定本站账号</label>
                </dt>
                <dd class="opt">
                    <div class="onoff">
                        <label for="bind1" class="cb-enable {if condition='isset($info.data.bind) && $info.data.bind eq 1'}selected{/if}">开启</label>
                        <label for="bind0" class="cb-disable {if condition='!isset($info.data.bind) || $info.data.bind eq 0'}selected{/if}">关闭</label>
                        <input id="bind1" name="bind" value="1" type="radio" {if condition="isset($info.data.bind) && $info.data.bind eq 1"} checked="checked"{/if}>
                        <input id="bind0" name="bind" value="0" type="radio" {if condition="!isset($info.data.bind) || $info.data.bind eq 0"} checked="checked"{/if}>
                    </div>
                    <p class="notic">开启后微信扫码登录用户可以选择绑定本站已有账号</p>
                </dd>
            </dl>
            {/if}
            <dl class="row">
                <dt class="tit">
                    <label for="appid"><em>*</em>AppID</label>
                </dt>
                <dd class="opt">
                    <input type="text" name="appid" value="{$info.data.appid|default=''}" id="appid" class="input-txt">
                    <span class="err"></span>
                    <p class=""></p>
                </dd>
            </dl>
            <dl class="row">
                <dt class="tit">
                    <label for="secret"><em>*</em>AppSecret</label>
                </dt>
                <dd class="opt">
                    <input type="text" name="secret" value="{$info.data.secret|default=''}" id="secret"
                           class="input-txt">
                    <span class="err"></span>
                    <p class=""></p>
                </dd>
            </dl>
            <div class="bot">
                <a href="JavaScript:void(0);" onclick="checkForm();" class="ncap-btn-big ncap-btn-green" id="submitBtn">确认提交</a>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript">
    // 判断输入框是否为空
    function checkForm(){
        if($.trim($('input[name=appid]').val()) == ''){
            showErrorMsg('AppID不能为空！');
            $('input[name=appid]').focus();
            return false;
        }
        if($.trim($('input[name=secret]').val()) == ''){
            showErrorMsg('AppSecret不能为空！');
            $('input[name=secret]').focus();
            return false;
        }
        layer_loading('正在处理');
        $('#post_form').submit();
    }
</script>
<script type="text/javascript" src="__SKIN__/js/clipboard.min.js"></script>
<script type="text/javascript">
    function showtext(classname){
        var clipboard1 = new Clipboard("."+classname);clipboard1.on("success", function(e) {layer.msg("复制成功");});clipboard1.on("error", function(e) {layer.msg("复制失败！请手动复制", {icon:2});}); 
    }
</script>
{include file="footer.htm" /}